<template>
  <div class="content">
    <div>
      <p>开发商总数</p>
      <div class="data">
        <div class="rule">
          <Rule :number="12530" />
        </div>
        <div>
          <span class="dDigital_number">
            <!-- 12530 -->
            <countTo :endVal="12530" />
          </span>家
        </div>
      </div>
    </div>
    <div>
      <p>项目总数</p>
      <div class="data">
        <div class="rule">
          <Rule :number="9640" />
        </div>
        <div>
          <span class="dDigital_number">
            <!-- 9640 -->
            <countTo :endVal="9640" />
          </span>个
        </div>
      </div>
    </div>
    <div>
      <p>经纪机构数</p>
      <div class="data">
        <div class="rule">
          <Rule :number="17260" />
        </div>
        <div>
          <span class="dDigital_number">
            <!-- 17260 -->
            <countTo :endVal="17260" />
          </span>家
        </div>
      </div>
    </div>
    <div>
      <p>经纪人总数</p>
      <div class="data">
        <div class="rule">
          <Rule :number="32530" />
        </div>
        <div>
          <span class="dDigital_number">
            <!-- 32530 -->
            <countTo :endVal="32530" />
          </span>人
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import Rule from "./rule";
export default {
  name: "perSale",
  props: ["year"],
  components: {
    Rule
  },
  mounted() {
    const { year } = this;
    this.http
      .post("", {
        path: "st",
        groupid: 28,
        year: year
      })
      .then(res => {
        console.log(res);
      });
  },
  data: () => {
    return {
      fdc_fwys_kfszs: 0, //开发商总数（家）
      fdc_fwys_xmzs: 0, //项目总数（个）
      fdc_fwys_jjjgs: 0, //经纪机构数（家）
      fdc_fwys_jjrzs: 0 //经纪人总数（人）
    };
  }
};
</script>

<style lang="scss" scoped>
.content {
  width: 40rem;
  margin-top: 2rem;
  > div {
    width: 19.46rem;
    display: inline-block;
    margin-bottom: 2rem;
    height: 9.077rem;
    background: url("../../../assets/background/estate/bg_PreSale.png")
      no-repeat center;
    background-size: 100% 100%;
    padding: 0 1rem;
    color: #bed7fa;
    &:nth-of-type(2n) {
      margin-left: 1rem;
    }
    p {
      font-size: 1.077rem;
      padding: 0.6rem 0;
    }
    .data {
      display: flex;
      .rule {
        margin-top: 0.25rem;
        width: 5rem;
        height: 6rem;
        margin-right: 1rem;
      }
      .dDigital_number {
        font-size: 2.615rem;
        color: #fff;
        letter-spacing: 0.0356em;
        line-height: 2em;
      }
    }
  }
}
</style>